import java.awt.BorderLayout;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

import javax.imageio.ImageIO;
import javax.swing.JFrame;
import javax.swing.UIManager;

import planilha.Planilha;
import planilha.menu.PlanilhaMenuBar;
import planilha.model.MovimentacoesTableModel;

/**
 * entry point
 * 
 * @author sombriks
 *
 */
public class PlanilhaMain {

	public static void main(String[] args) throws Exception {
		UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		MovimentacoesTableModel model = new MovimentacoesTableModel();
		Planilha p = new Planilha(model);
		JFrame frame = new JFrame("Planilha");
		frame.setIconImage(ImageIO.read(Planilha.class//
				.getResource("icon-planilha.png")));
		frame.setJMenuBar(new PlanilhaMenuBar(model,p));
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setLayout(new BorderLayout());
		frame.add(p, BorderLayout.CENTER);
		frame.pack();
		frame.setBounds(100, 100, 640, 480);
		frame.setVisible(true);
	}
}
